<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vite App</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<style>
    
</style>
<body>
    <div id="app" class="Demo">
        <!--multiple允许多选-->
        <select v-model="selected" name="fruit" multiple>
            <option value="www.runoob.com">Runoob</option>
            <option value="www.google.com">Google</option>
            <option value="www.taobao.com">Taobao</option>
        </select>
        <div id="output">
            选择的网站是：{{selected}}
        </div>
        <!--multiple允许多选-->
        <select v-model="selected" name="fruit" multiple>
            <option v-for="option in options" :key="option.url">
                {{option.text}}
            </option>
        </select>
        <div id="output">
            选择的网站是：{{selected}}
        </div>
    </div>
    <script>
        var app = {
            data() {
                return {
                    selected:'',
                    options:[
                        {text:'Runoob',url:'www.runoob.com'},
                        {text:'Google',url:'www.google.com'},
                        {text:'Taobao',url:'www.taobao.com'},
                    ]
                }
            },
            methods:{
                
            }
        }
        var vm = Vue.createApp(app).mount('#app')
    </script>
</body>
</html>
